<?php
/*
Template Name: Testimonials
*/
?>
<?php get_header(); ?>
<div id="main"  class="main-with-sidebar clearfix">
<div id="post-content">
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1 id="page-title"><?php the_title(); ?></h1>			
    <?php the_content(); ?>
    <?php endwhile; ?>
    <?php endif; ?>
        <ul id="testimonials-wrap" class="clearfix">
			<?php $portfolio_posts = new WP_Query(array(
           		'post_type' =>'Testimonials',
            	'posts_per_page' => -1,
            	'orderby' => 'ASC'
            ));
            ?>
            <?php
            	while($portfolio_posts->have_posts()) : $portfolio_posts->the_post();
            	$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'testimonials');  //get featured image
            ?>
            <li>
            	<div class="testimonials-avatar">
                	<img src="<?php echo $thumbnail[0]; ?>" alt="<?php the_title(' '); ?>" />
                </div>
                <!-- END testimonials-avatar -->
                <div class="testimonials-outter">
                    <div class="testimonials-inner">
                        <h2><?php the_title(); ?></h2>
                        <?php the_content(' ') ?>
                    </div>
                    <!-- END testimonials-inner -->
                </div>
                <!-- END testimonials-outter -->
            </li>
            <?php endwhile; ?>
        </ul>
    	<!-- END testimonials-wrap -->
    </div>
	<!-- END post-content -->
<?php get_sidebar(page); ?>
<?php get_footer(); ?>